<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
  </head>
  <body>
    <button id="buttonError">Trigger error</button>
    <button id="buttonErrorMutation">Trigger error</button>

    <script>
      document.getElementById('buttonError').addEventListener('click', () => {
        throw new Error('test error happened');
      });

      document.getElementById('buttonErrorMutation').addEventListener('click', () => {
        document.getElementById('buttonErrorMutation').innerText = 'Test error happened!';

        throw new Error('test error happened');
      });
    </script>
  </body>
</html>
